//
//	GetCommentsListParamModel.swift
//
//	Create by 松 松 on 13/5/2019
//	Copyright © 2019. All rights reserved.
//	Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport

import Foundation


class GetCommentsListParamModel : NSObject, NSCoding, SSMap{

	public var appCode : String?
	public var mainTypeCode : String?
	public var pageNumber : Int?
	public var pageSize : Int?
	public var replyCommentId : String?
	public var toItemCode : String?
    public var commentSate : Int?
    public var likeNum : Int?

    override init() {
        
    }
	/**
	 * Instantiate the instance using the passed dictionary values to set the properties values
	 */
	required init(fromDictionary dictionary: [String:Any]){
		appCode = dictionary["appCode"] as? String
		mainTypeCode = dictionary["mainTypeCode"] as? String
		pageNumber = dictionary["pageNumber"] as? Int
		pageSize = dictionary["pageSize"] as? Int
		replyCommentId = dictionary["replyCommentId"] as? String
		toItemCode = dictionary["toItemCode"] as? String
        commentSate = dictionary["commentSate"] as? Int
        likeNum = dictionary["likeNum"] as? Int
	}

	/**
	 * Returns all the available property values in the form of [String:Any] object where the key is the approperiate json key and the value is the value of the corresponding property
	 */
	func toDictionary() -> [String:Any]
	{
		var dictionary = [String:Any]()
		if appCode != nil{
			dictionary["appCode"] = appCode
		}
		if mainTypeCode != nil{
			dictionary["mainTypeCode"] = mainTypeCode
		}
		if pageNumber != nil{
			dictionary["pageNumber"] = pageNumber
		}
		if pageSize != nil{
			dictionary["pageSize"] = pageSize
		}
		if replyCommentId != nil{
			dictionary["replyCommentId"] = replyCommentId
		}
		if toItemCode != nil{
			dictionary["toItemCode"] = toItemCode
		}
        if commentSate != nil{
            dictionary["commentSate"] = commentSate
        }
        if likeNum != nil{
            dictionary["likeNum"] = likeNum
        }
		return dictionary
	}

    /**
    * NSCoding required initializer.
    * Fills the data from the passed decoder
    */
    @objc required init(coder aDecoder: NSCoder)
	{
         appCode = aDecoder.decodeObject(forKey: "appCode") as? String
         mainTypeCode = aDecoder.decodeObject(forKey: "mainTypeCode") as? String
         pageNumber = aDecoder.decodeObject(forKey: "pageNumber") as? Int
         pageSize = aDecoder.decodeObject(forKey: "pageSize") as? Int
         replyCommentId = aDecoder.decodeObject(forKey: "replyCommentId") as? String
         toItemCode = aDecoder.decodeObject(forKey: "toItemCode") as? String
        commentSate = aDecoder.decodeObject(forKey: "commentSate") as? Int

	}

    /**
    * NSCoding required method.
    * Encodes mode properties into the decoder
    */
    @objc func encode(with aCoder: NSCoder)
	{
		if appCode != nil{
			aCoder.encode(appCode, forKey: "appCode")
		}
		if mainTypeCode != nil{
			aCoder.encode(mainTypeCode, forKey: "mainTypeCode")
		}
		if pageNumber != nil{
			aCoder.encode(pageNumber, forKey: "pageNumber")
		}
		if pageSize != nil{
			aCoder.encode(pageSize, forKey: "pageSize")
		}
		if replyCommentId != nil{
			aCoder.encode(replyCommentId, forKey: "replyCommentId")
		}
		if toItemCode != nil{
			aCoder.encode(toItemCode, forKey: "toItemCode")
		}
        if commentSate != nil{
            aCoder.encode(commentSate, forKey: "commentSate")
        }
	}

}
